﻿using System.Collections.Generic;
using System.Data;
using System.ServiceModel;
using HF.WCF.WFInterface;
using HF.WorkFlow.DataContract;

namespace HF.WCF.WFClientAgent
{
    public class ArchitectureClient :ClientBase<IArchitectureService>, IArchitectureService
    {
        public ArchitectureClient() {
        }
        
        public ArchitectureClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public ArchitectureClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public ArchitectureClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public ArchitectureClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }

        public List<UserEntity> GetUserEntitys(string architectureId)
        {
            
            return base.Channel.GetUserEntitys(architectureId);
        }

        public List<ArchitectureEntity> GetDepartmentEntitysOfUser(string userId)
        {
            return base.Channel.GetDepartmentEntitysOfUser(userId);
        }

        public List<ArchitectureEntity> GetAllDepartmentEntitys()
        {
            // private ArchitectureServiceClient client;
            return base.Channel.GetAllDepartmentEntitys();
        }

        public List<ArchitectureEntity> GetChildArchitectureEntitys(string architectureId)
        {
            return base.Channel.GetChildArchitectureEntitys(architectureId);
        }

        public List<ArchitectureEntity> GetChildDepartmentEntitys(string architectureId)
        {
            return base.Channel.GetChildDepartmentEntitys(architectureId);
        }

        public List<ArchitectureEntity> GetDutyEntitys(string architectureId)
        {
            return base.Channel.GetDutyEntitys(architectureId);
        }

        public List<ArchitectureEntity> GetLeaderEntitys(string architectureId)
        {
            return base.Channel.GetLeaderEntitys(architectureId);
        }

        public string GetFatherId(string architectureId)
        {
            return base.Channel.GetFatherId(architectureId);
        }

        public void MoveUserIntoArchitecture(string userId, string architectureId)
        {
            base.Channel.MoveUserIntoArchitecture(userId, architectureId);
        }

        public void RemoveAllArchitectures(string userId)
        {
            base.Channel.RemoveAllArchitectures(userId);
        }

        public void RemoveUser(string userId, string architectureId)
        {
            base.Channel.RemoveUser(userId, architectureId);
        }

        public void RemoveAllUsers(string architectureId)
        {
            base.Channel.RemoveAllUsers(architectureId);
        }

        public List<ArchitectureEntity> GetHighDepartmentEntitysOfUser(string userId)
        {
           return base.Channel.GetHighDepartmentEntitysOfUser(userId);
        }

        public List<ArchitectureEntity> GetLowerDepartmentEntitysOfUser(string userId)
        {
          return  base.Channel.GetLowerDepartmentEntitysOfUser(userId);
        }


        public bool Exists(string architectureId)
        {
            return  base.Channel.Exists(architectureId);
        }

        public ArchitectureEntity GetArchitectureEntity(string architectureId)
        {
            return base.Channel.GetArchitectureEntity(architectureId) ;
        }

        public int Insert(ArchitectureEntity entity)
        {
            return base.Channel.Insert(entity);
        }

        public int Update(ArchitectureEntity entity)
        {
            return base.Channel.Update(entity);
        }

        public int Delete(string architectureId)
        {
           return  base.Channel.Delete(architectureId);
        }
        public DataTable GetArchitecturesOfUser(string userId)
        {
            return base.Channel.GetArchitecturesOfUser(userId);
        }
    }
}
